package net.csdn.business.discuss.api.service.impl;

import lombok.RequiredArgsConstructor;
import net.csdn.business.discuss.api.enums.AutditActionEventEnum;
import net.csdn.business.discuss.api.event.DiscussActivityApplicationEvent;
import net.csdn.business.discuss.api.event.DiscussAuditApplicationEvent;
import net.csdn.business.discuss.api.model.dto.AuditEventDTO;
import net.csdn.business.discuss.api.model.dto.DiscussActivityEventDTO;
import net.csdn.business.discuss.api.service.IDiscussAuditService;
import net.csdn.business.discuss.common.model.dto.SendDiscussAuditDTO;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Service;

/**
 * @ClassName DiscussAuditServiceImpl
 * @Description TODO
 * @Author zhangyl
 * @Date 2023/7/29 17:07
 */
@Service
@RequiredArgsConstructor
public class DiscussAuditServiceImpl implements IDiscussAuditService {

    private final ApplicationEventPublisher applicationEventPublisher;
    @Override
    public void sendDiscussAudit(AuditEventDTO event) {
        // 发布事件
        DiscussAuditApplicationEvent auditEvent=new DiscussAuditApplicationEvent(event);
        applicationEventPublisher.publishEvent(auditEvent);
    }
}
